package com.project.projectdemo.utils;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 缓存工具类
 * @author MECHREVO
 *
 */
public class CacheUtils {

	private static ConcurrentHashMap<Object,Object> cacheMap = new ConcurrentHashMap<>();
	
	/**
	 * 设置缓存
	 * @param key
	 * @param value
	 */
	public static void setAttribute(Object key,Object value){
		cacheMap.put(key, value);
	}
	
	/**
	 * 获取缓存
	 * @param key
	 * @return
	 */
	public static Object getAttribute(Object key){
		return cacheMap.get(key);
	}
	
}
